package com.yb.domain.tribune;

import java.util.Date;

import com.yb.base.annotation.Column;
import com.yb.base.annotation.Table;
import com.yb.base.entity.BaseEntity;

/**
 * TribuneAction entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Table("t_p_tribune")
public class Tribune extends BaseEntity {

	// Fields

	private String title;
	private Long authorId;
	private String authorName;
	private Date createTime;
	@Column(name="reject")
	private String createTimeString;
	private Date lastVisitTime;
	@Column(name="reject")
	private String lastVisitTimeString;
	private String isMarrow;
	private String isTop;
	private Date toTopTime;
	@Column(name="reject")
	private String toTopTimeString;
	private Long flowCount;
	private Long viewCount;
	private String content;
	private Long eggs;
	private Long flowers;
	@Column(name="reject")
	private String imgFlag;

	// Property accessors

	public Long getEggs() {
		return eggs;
	}

	public void setEggs(Long eggs) {
		this.eggs = eggs;
	}

	public Long getFlowers() {
		return flowers;
	}

	public void setFlowers(Long flowers) {
		this.flowers = flowers;
	}

	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Long getAuthorId() {
		return this.authorId;
	}

	public void setAuthorId(Long authorId) {
		this.authorId = authorId;
	}

	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getLastVisitTime() {
		return this.lastVisitTime;
	}

	public void setLastVisitTime(Date lastVisitTime) {
		this.lastVisitTime = lastVisitTime;
	}

	public Long getFlowCount() {
		return this.flowCount;
	}

	public void setFlowCount(Long flowCount) {
		this.flowCount = flowCount;
	}

	public Long getViewCount() {
		return this.viewCount;
	}

	public void setViewCount(Long viewCount) {
		this.viewCount = viewCount;
	}

	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getAuthorName() {
		return authorName;
	}

	public void setAuthorName(String authorName) {
		this.authorName = authorName;
	}

	public String getCreateTimeString() {
		return createTimeString;
	}

	public void setCreateTimeString(String createTimeString) {
		this.createTimeString = createTimeString;
	}

	public String getLastVisitTimeString() {
		return lastVisitTimeString;
	}

	public void setLastVisitTimeString(String lastVisitTimeString) {
		this.lastVisitTimeString = lastVisitTimeString;
	}

	public String getIsMarrow() {
		return isMarrow;
	}

	public void setIsMarrow(String isMarrow) {
		this.isMarrow = isMarrow;
	}

	public String getIsTop() {
		return isTop;
	}

	public void setIsTop(String isTop) {
		this.isTop = isTop;
	}

	public Date getToTopTime() {
		return toTopTime;
	}

	public void setToTopTime(Date toTopTime) {
		this.toTopTime = toTopTime;
	}

	public String getToTopTimeString() {
		return toTopTimeString;
	}

	public void setToTopTimeString(String toTopTimeString) {
		this.toTopTimeString = toTopTimeString;
	}

	public String getShortTitle() {
		if(null!=title){
			if(title.length()>20){
				return title.substring(0,20)+"……";
			}
		}
		return title;
	}

	public String getImgFlag() {
		imgFlag="0";
		if(null!=content){
			if(content.contains("<img")){
//				System.out.println(content);
				imgFlag="1";
//				System.out.println(imgFlag);
			}
		}
		return imgFlag;
	}

	public void setImgFlag(String imgFlag) {
		this.imgFlag = imgFlag;
	}

}